﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace SageKing.Database.Contracts;

/// <summary>
/// IResourceService接口
/// </summary>
public interface IWebClientResourceService<T, R, TKey>
{
    /// <summary>
    /// HttpGet
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    public Task<R> GetAsync(TKey id);
    /// <summary>
    /// HttpPost
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    public Task<TKey> CreateAsync(T model);
    /// <summary>
    /// HttpPut
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>

    public Task UpdateAsync(T model);

    /// <summary>
    /// HttpDelete
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>

    public Task DeleteAsync(TKey id);


}
